﻿/*
 * UdpStream.h
 */

#ifndef __GDK_UDPSTREAM_H__
#define __GDK_UDPSTREAM_H__


#include <gdk/net/Socket.h>
#include <gdk/core/Memory.h>
#include <gdk/core/Task.h>
#include <gdk/core/IO.h>
#include <gdk/net/UdpSecureConnection.h>



namespace gdk
{



	class GDK_NET_EXPORT UdpStream : public UdpSecureConnection, public IO
	{
		DECLARE_CLASS_HANDLE(UdpStream)
		DECLARE_CLASS_INSTANCE(UdpStream)


	protected:
		__INLINE__ UdpStream(void)
		{}
		__INLINE__ ~UdpStream(void)
		{}

	public:
		virtual ssize_t available(void) const;
		virtual ssize_t peek(void *buf, ssize_t size) const;
		virtual ssize_t read(void *buf, ssize_t size);
		virtual ssize_t write(const void *data, ssize_t size);
	};





}//namespace gdk


#endif //__GDK_UDPSTREAM_H__
